using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;

namespace HamcoWcs.Entitys.RoleInfos
{
    public class RoleInfoConfig : IEntityTypeConfiguration<RoleInfo>
    {
        public void Configure(EntityTypeBuilder<RoleInfo> builder)
        {
            builder.HasComment("角色表");
            builder.Property(x => x.RoleName).IsRequired().HasMaxLength(30).HasComment("角色名");
            builder.Property(x => x.Remark).IsRequired().HasMaxLength(255).HasComment("简述");
            builder.Property(x => x.Menus).IsRequired().HasMaxLength(4096).HasComment("角色列表");
            builder.Property(x => x.Enabled).IsRequired().HasComment("是否启用");

        }
    }
}